﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Microsoft.Reporting.WebForms;
using PM.Services;

namespace PM.Site
{
    public partial class TestReport : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.LoadReport();
        }

        private void LoadReport()
        {
            //if (!Page.IsPostBack)
            //{
            try
            {

                ReportDataSource ds = new ReportDataSource();
                ds.Name = "UserType_USER_TYPE";
                ds.Value = ReportServices.GetUserTypes();


                //ReportViewer1.LocalReport.ReportPath = "Reports/Report_Test.rdlc";
                ReportViewer1.LocalReport.ReportPath = "Reports/Report22.rdlc";
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportViewer1.LocalReport.DataSources.Add(ds);




                //ReportViewer1.LocalReport.SetParameters(new ReportParameter[] {
                       
                //        new ReportParameter("CompanyName","Capital Trust Wealth")});

                //this.reportViewer1.RefreshReport();
                //reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
                //reportViewer1.ZoomMode = ZoomMode.Percent;
                //reportViewer1.ZoomPercent = 100;
            }
            catch (Exception e)
            {

            }
            //}
        }
    }
}
